﻿/*************************************************************************
 * Created by OhZee Creative, LLC
 * 2013
 * This code is licensed under Microsoft Public License (Ms-PL)
 * http://opensource.org/licenses/ms-pl
 * http://ozframework.codeplex.com/
 *************************************************************************/

namespace OhZeeCreative.Helpers
{
    using System;
    using Windows.ApplicationModel.DataTransfer;

    public static class ShareHelper
    {
        public static void ShareLink(DataRequest request, Uri link, string title, string description)
        {
            // This method should be called from GetShareContent() override in a page that derives from SharePage. See "Sharing Content Source App sample".

            DataPackage requestData = request.Data;
            requestData.Properties.Title = title;
            requestData.Properties.Description = description; // The description is optional.
            requestData.SetUri(link);
        }

        public static void ShowShareCharm()
        {
            DataTransferManager.ShowShareUI();
        }
    }
}
